Removing consecutive repeated characters from string using C program